<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page language="java" contentType="text/html; ISO-8859-1; charset=UTF-8" pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//ENhttp://wwww.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type">
    <title>HttpMessageConverter Demo</title>
</head>
<body>
    <div id="resp"></div>
    <input type="button" onclick="req()" value="请求"/>
    <script src="assets/js/jquery.js" type="text/javascript"></script>
    <script>
        function req() {
            $.ajax({
                url: "convert",
                data: "123-mattscl",
                type: "POST",
                contentType: "application/x-wisely",  //指定媒体类型是我们自定义的application/x-wisely
                success: function (data) {
                    $("#resp").html(data);
                }
            })
        }
    </script>
</body>
</html>

